<!--PHP echo and print Statements
There are some differences between echo and print:

echo - can output one or more strings
print - can only output one string, and returns always 1
Tip: echo is marginally faster compared to print as echo does not return any value.-->
<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>PHP Echo / Print</title>
</head>
<body>
<h1>PHP Echo / Print</h1>
<div>
    <h3>Display Strings With Echo</h3>
    <?php
    echo("<h2>PHP is fun!</h2>");
    echo("Hello world!<br/>");
    echo("I'm about to learn PHP!<br/>");
    echo "This", " string", " was", " made", " with multiple parameters";
    ?>
</div>
<div>
    <h3>Display Variables With Echo</h3>
    <?php
    $txt1 = "Learn PHP";
    $txt2 = "W3Schools.com";
    $cars =  array("Volvo","BMW","Toyota");

    echo($txt1);
    echo("<br/>");
    echo("Study PHP at $txt2");
    echo("<br/>");
    echo("My car is a {$cars[0]}");
    ?>
</div>

<div>
    <h3>Display Strings With Print</h3>
    <?php
    print "<h2>PHP is fun!</h2>";
    print "Hello world!<br>";
    print "I'm about to learn PHP!";
    ?>
</div>
<div>
    <h3>Display Variables With Print</h3>
    <?php
    $txt1="Learn PHP";
    $txt2="W3Schools.com";
    $cars=array("Volvo","BMW","Toyota");

    print $txt1;
    print "<br>";
    print "Study PHP at $txt2";
    print "<br/>";
    print "My car is a {$cars[0]}";
    ?>
</div>
</body>
</html>

